package com.attilax.chChar;

import java.util.List;
import java.util.Map;

import com.attilax.io.filex;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

public class txt2db {
	
	public static void main(String[] args) {
		String f="c:\\0key\\secLev1000.txt";
		List<String> li=filex.read2list(f, "gbk");
		int curStroke = 0;
		List<Map> rs=Lists.newArrayList();
		Map m=Maps.newLinkedHashMap();
		String line="";
		for (String l : li) {
			l=l.trim();
			if(l.contains("画") && l.length()>1)
			{
				String num_s=l.substring(0, l.length()-1);
				int strokeNum=cnchar2num.chineseNumber2Int(num_s);
				if(strokeNum>curStroke)
				{
					curStroke=strokeNum;
					m=Maps.newLinkedHashMap();
					m.put("stk", strokeNum);
					m.put("set", Lists.newArrayList());
					rs.add(m);
					continue;
				}	
				
			}else  //normal
			{
				//List norList=(List) m.get("set");
			//	norList.add(l);
				line=l+"\t"+String.valueOf(curStroke);
				System.out.println(line);
				line="";
				
			}			
			
		}
		
//		for (Map map : rs) {
//			 List setLi=(List) m.get("set");
//		}
	}

}
